
Namespace Validation

    Public Class RangeRuleEventArgs
        Inherits RuleEventArgs

#Region " Declarations "

        Private _enumLowerRangeBoundaryType As RangeBoundaryType = RangeBoundaryType.Exclusive
        Private _enumRequiredEntry As RequiredEntry = RequiredEntry.No
        Private _enumUpperRangeBoundaryType As RangeBoundaryType = RangeBoundaryType.Exclusive
        Private _objLowerValue As IComparable
        Private _objUpperValue As IComparable

#End Region

#Region " Properties "

        Public Property LowerRangeBoundaryType() As RangeBoundaryType
            Get
                Return _enumLowerRangeBoundaryType
            End Get
            Set(ByVal Value As RangeBoundaryType)
                _enumLowerRangeBoundaryType = Value
            End Set
        End Property

        Public Property LowerValue() As IComparable
            Get
                Return _objLowerValue
            End Get
            Set(ByVal Value As IComparable)
                _objLowerValue = Value
            End Set
        End Property

        Public Property RequiredEntry() As RequiredEntry
            Get
                Return _enumRequiredEntry
            End Get
            Set(ByVal Value As RequiredEntry)
                _enumRequiredEntry = Value
            End Set
        End Property

        Public Property UpperRangeBoundaryType() As RangeBoundaryType
            Get
                Return _enumUpperRangeBoundaryType
            End Get
            Set(ByVal Value As RangeBoundaryType)
                _enumUpperRangeBoundaryType = Value
            End Set
        End Property

        Public Property UpperValue() As IComparable
            Get
                Return _objUpperValue
            End Get
            Set(ByVal Value As IComparable)
                _objUpperValue = Value
            End Set
        End Property

#End Region

#Region " Constructor "

        Public Sub New(ByVal enumLowerRangeBoundaryType As RangeBoundaryType, ByVal enumRequiredEntry As RequiredEntry, ByVal enumUpperRangeBoundaryType As RangeBoundaryType, ByVal objLowerValue As IComparable, ByVal objUpperValue As IComparable, ByVal strCustomMessage As String, ByVal strPropertyFriendlyName As String, ByVal strPropertyName As String, ByVal strRuleSet As String)
            MyBase.New(strPropertyName, strPropertyFriendlyName, strRuleSet, strCustomMessage)
            _enumLowerRangeBoundaryType = enumLowerRangeBoundaryType
            _enumRequiredEntry = enumRequiredEntry
            _enumUpperRangeBoundaryType = enumUpperRangeBoundaryType
            _objLowerValue = objLowerValue
            _objUpperValue = objUpperValue
        End Sub

        Public Sub New(ByVal e As RangeValidatorAttribute, ByVal strPropertyName As String)
            MyBase.New(strPropertyName, e.PropertyFriendlyName, e.RuleSet, e.CustomMessage)
            _enumLowerRangeBoundaryType = e.LowerRangeBoundaryType
            _enumUpperRangeBoundaryType = e.UpperRangeBoundaryType
            _objLowerValue = e.LowerValue
            _objUpperValue = e.UpperValue
            _enumRequiredEntry = e.RequiredEntry
        End Sub

#End Region

    End Class

End Namespace
